 |
ESP3D Lib
1.0
3D Printer WiFi Library
|
Go to the documentation of this file.
28 #define ENABLE_CAPTIVE_PORTAL
31 #define ENABLE_SERIAL2SOCKET_OUT
33 #define ENABLE_SERIAL2SOCKET_IN
36 #define NAMESPACE "MARLIN"
37 #define HOSTNAME_ENTRY "ESP_HOSTNAME"
38 #define STA_SSID_ENTRY "STA_SSID"
39 #define STA_PWD_ENTRY "STA_PWD"
40 #define STA_IP_ENTRY "STA_IP"
41 #define STA_GW_ENTRY "STA_GW"
42 #define STA_MK_ENTRY "STA_MK"
43 #define ESP_WIFI_MODE "WIFI_MODE"
44 #define AP_SSID_ENTRY "AP_SSID"
45 #define AP_PWD_ENTRY "AP_PWD"
46 #define AP_IP_ENTRY "AP_IP"
47 #define AP_CHANNEL_ENTRY "AP_CHANNEL"
48 #define HTTP_ENABLE_ENTRY "HTTP_ON"
49 #define HTTP_PORT_ENTRY "HTTP_PORT"
50 #define TELNET_ENABLE_ENTRY "TELNET_ON"
51 #define TELNET_PORT_ENTRY "TELNET_PORT"
52 #define STA_IP_MODE_ENTRY "STA_IP_MODE"
55 #define ESP_WIFI_OFF 0
56 #define ESP_WIFI_STA 1
63 #define ESP_SAVE_ONLY 0
64 #define ESP_APPLY_NOW 1
67 #define DEFAULT_HOSTNAME "marlinesp"
68 #define DEFAULT_STA_SSID "MARLIN_ESP"
69 #define DEFAULT_STA_PWD "12345678"
70 #define DEFAULT_STA_IP "0.0.0.0"
71 #define DEFAULT_STA_GW "0.0.0.0"
72 #define DEFAULT_STA_MK "0.0.0.0"
73 #define DEFAULT_WIFI_MODE ESP_WIFI_AP
74 #define DEFAULT_AP_SSID "MARLIN_ESP"
75 #define DEFAULT_AP_PWD "12345678"
76 #define DEFAULT_AP_IP "192.168.0.1"
77 #define DEFAULT_AP_MK "255.255.255.0"
78 #define DEFAULT_AP_CHANNEL 1
79 #define DEFAULT_WEBSERVER_PORT 80
80 #define DEFAULT_HTTP_STATE 1
81 #define HIDDEN_PASSWORD "********"
84 #define MAX_SSID_LENGTH 32
85 #define MIN_SSID_LENGTH 1
86 #define MAX_PASSWORD_LENGTH 64
89 #define MIN_PASSWORD_LENGTH 8
90 #define MAX_HOSTNAME_LENGTH 32
91 #define MIN_HOSTNAME_LENGTH 1
92 #define MAX_HTTP_PORT 65001
93 #define MIN_HTTP_PORT 1
94 #define MAX_TELNET_PORT 65001
95 #define MIN_TELNET_PORT 1
97 #define MAX_CHANNEL 14
100 #ifndef _WIFI_CONFIG_H
101 #define _WIFI_CONFIG_H
109 static void wait(uint32_t milliseconds);
110 static bool isValidIP(
const char *
string);
127 static bool ConnectSTA2AP();
128 static void WiFiEvent(WiFiEvent_t event);
129 static bool restart_ESP_module;
static bool isPasswordValid(const char *password)
static bool isHostnameValid(const char *hostname)
static int32_t getSignal(int32_t RSSI)
static bool isValidIP(const char *string)
static String IP_string_from_int(uint32_t ip_int)
static bool isSSIDValid(const char *ssid)
static void restart_ESP()
static void wait(uint32_t milliseconds)
static uint32_t IP_int_from_string(String &s)